import request from '@/utils/request'

// 工单统计
export const getCooperation = () => {
  return request.get('/api/task-service/task/taskReportInfo/2022-11-01%2000:00:00/2022-11-23%2023:59:59'
  )
}
// 订单量
export const getOrderCount = () => request.get('/api/order-service/report/orderCount?start=2022-11-01+00:00:00&end=2022-11-23+23:59:59')
// 销售额
export const getSaleNum = () => request.get('/api/order-service/report/orderAmount?start=2022-11-01+00:00:00&end=2022-11-23+23:59:59')
// 热榜商品
export const getHotGoods = () => request.get('/api/order-service/report/skuTop/10/2022-11-01/2022-11-23')

// 获取点位总数
export const getPoint = () => {
  return request.get('/api/vm-service/node/nodeCollect')
}
// 获取销售额趋势图
export const getSaleTrend = (id, start, end) => request.get(`/api/order-service/report/amountCollect/${id}/${start}/${end}`)

// 获取销售额分布图
export const getSaleAreas = (start, end) => request.get(`/api/order-service/report/regionCollect/${start}/${end}`)
// 点位数
export const getNode = () => request.get('/api/vm-service/node/count')
// 合作商数
export const getPartner = () => request.get('/api/user-service/partner/count')
